package com.zhang.modules.dict.service.impl;

import com.zhang.common.jpa.entity.DTO;
import com.zhang.common.jpa.service.impl.BaseServiceImpl;
import com.zhang.modules.dict.entity.DictType;
import com.zhang.modules.dict.rep.DictTypeRep;
import com.zhang.modules.dict.service.IDictTypeService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DictTypeService extends BaseServiceImpl<DictTypeRep, DictType,String> implements IDictTypeService {


    public DictType getByType(String typeValue){
        return getRep().findByDictTypeEquals(typeValue);
    }

    @Override
    public <R extends DTO> R convert2DtoSingle(DictType orginInfo) {
        return (R) orginInfo;
    }
}
